﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SchoolManagementSystem.GUI
{
    public partial class PrincipalViewStudent : SchoolManagementSystem.SuperForm1
    {
        public PrincipalViewStudent()
        {
            InitializeComponent();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (txtName.Text != "")
            {
                txtName.ReadOnly = false;
                txtClass.ReadOnly = false;
                txtTelephone.ReadOnly = false;
                txtAddress.ReadOnly = false;
                txtNIC.ReadOnly = false;
                textBox7.ReadOnly = false;
                textBox8.ReadOnly = false;
                textBox9.ReadOnly = false;
                textBox10.ReadOnly = false;
                txtBirthDay.ReadOnly = false;
            }
            else {
                MessageBox.Show("Student does not exist");
            }

        }

        private void button2_Click(object sender, EventArgs e)
        {
            
                StudentMarksView marks = new StudentMarksView();
                marks.Show();
            
        }

        private void button3_Click(object sender, EventArgs e)
        {
            
                StudentAttendanceView attendance = new StudentAttendanceView();
                attendance.Show();
            
        }

        private void cmdSearch_Click(object sender, EventArgs e)
        {
            studentTableAdapter.ClearBeforeFill = true;
            studentTableAdapter.FillByPrincipal(sMSD_BaseDataSet.Student, txtAdmission.Text);
        }
    }
}
